#!/usr/bin/python

import os.path
import sys

if (len(sys.argv) > 1):
	for path in sys.argv[1:]:
		if os.path.isdir(path):
			print "Directory " + path + " exists"
			sys.exit(0)
		elif os.path.exists(path):
			print "Fatal: " + path + " is a file"
			sys.exit(1)
		else:
			print "Directory " + path + " doesn't exists..."
			try:
				os.makedirs(path)
				print "\t...Created"
				sys.exit(0)
			except os.error:
				print "\t...Could't be created"
				sys.exit(1)
